﻿@model LandManager.Web.Models.UserInfo

@{
    ViewBag.Title = "Create";
    var agencyList = ViewBag.Agency;
}

<style type="text/css">
    .txt160 {
        width: 160px;
        height: 23px;
        text-align: left;
        vertical-align: central;
        font-family: 'Microsoft YaHei';
        font-size: 0.9em;
    }

    .txttdsty {
        padding-left: 15px;
        width: 250px;
        font-family: 'Microsoft YaHei';
        font-size: 0.9em;
    }

    .tb2style {
        width: 1030px;
        background-color: #cfe7ff;
        height: 480px;
        margin: auto auto;
    }

    .td180 {
        width: 180px;
        text-align: right;
        vertical-align: central;
        font-size: 0.8em;
        font-family: 'Microsoft YaHei';
    }

    .td370 {
        width: 350px;
        text-align: left;
        padding: 30px;
        vertical-align: central;
        font-size: 0.9em;
        font-family: 'Microsoft YaHei';
    }

    .savebtn {
        width: 95px;
        height: 25px;
        margin-right: 50px;
    }

    .titleDiv {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
        vertical-align: top;
        height: 40px;
        font-size: 1.1em;
        font-family: 'Microsoft YaHei';
        font-weight: bold;
    }

    .titleSty {
        margin-top: 9px;
    }

    .tb1style {
        width: 1030px;
        margin: 10px auto 0px auto;
        background-color: #99CDFF;
        font-family: 'Microsoft YaHei';
        font-size: 0.9em;
    }

    .td85 {
        width: 83px;
        text-align: right;
        padding-right: 2px;
    }

    .td130 {
        width: 130px;
        text-align: right;
    }

    .td110 {
        width: 100px;
        text-align: right;
    }

    .td155 {
        padding-left: 15px;
        width: 155px;
        font-family: 'Microsoft YaHei';
        font-size: 0.9em;
    }

    .td230 {
        width: 230px;
        padding-left: 10px;
    }

    .txt230 {
        width: 230px;
        height: 23px;
        text-align: center;
        vertical-align: central;
        font-family: 'Microsoft YaHei';
        font-size: 0.9em;
    }

    .txt250 {
        width: 250px;
        height: 23px;
        text-align: center;
        vertical-align: central;
        font-family: 'Microsoft YaHei';
        font-size: 0.9em;
    }

    .aSty {
        width: 130px;
        height: 32px;
        line-height: 32px;
        vertical-align: central;
        margin: auto auto auto 10px;
        text-align: center;
        vertical-align: central;
        text-align: center;
        background: #2573c7;
        color: #fff;
        border: 0px;
        cursor: pointer;
        display: inline-block;
        text-decoration: none;
    }
</style>

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)


    <div class="titleDiv">
        <p class="titleSty">添加新用户</p>
    </div>
    <table class="tb1style">
        <tr style="height: 20px">
            <td class="td85">用户名</td>
            <td class="td230">
                @Html.EditorFor(model => model.user_name)
                @Html.ValidationMessageFor(model => model.user_name)
            </td>
        </tr>
        <tr style="height: 20px">
            <td class="td85">密码</td>
            <td class="td230">
                @Html.EditorFor(model => model.user_password)
                @Html.ValidationMessageFor(model => model.user_password)
            </td>
        </tr>
        <tr style="height: 20px">
            <td class="td85">二级机构</td>
            <td class="td230">
                <select id="user_agency" name="user_agency" class="select160">
                    @{
    if (agencyList != null)
    {
        foreach (var item in agencyList)
        {
            <option value="@item.agency_ID">@item.agency_name</option>
        }
    }
                    }
                </select>
            </td>
        </tr>
        <tr style="height: 20px">
            <td class="td85">是否设为管理员</td>
            <td class="td230">
                <input name="user_isAdmin" type="checkbox" value="1" />
                <input name="user_isAdmin" type="hidden" value="0" />
            </td>
        </tr>
        <tr>
            <td></td>
            <td style="text-align: left">
                <input id="Button1" type="submit" value="添加" class="aSty" />
            </td>
        </tr>
    </table>
}

<div>
    @Html.ActionLink("返回用户列表", "Index", null, new {@class= "aSty" })
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
